>$64.00 Q: What, if any, of this changed with the new Native Resource
>Manager?
Probably none of it, since these are all map-format limitations, and the
map didn't change in the port to native.
- Tim
--
Tim Dierks
tim@dierks.org
---------------------------
>From Bill Rose
Subject: [Q] MPW and printf()...Again
Date: 22 Sep 1995 14:47:19 GMT
Organization: NIST/ASD/SNLP
In article <43s0a3$oul@seaman.cc.purdue.edu>, ags@seaman.cc.purdue.edu (Dave Seaman) writes:
>
> It's because of the way MPW does input. Your code will work if you add
> a newline at the end of your prompt:
>
> printf("Please enter the name of the file to convert>\n");
> scanf("%s", &in_name);
> inp = fopen(in_name, "r");
>
> The reason is that when you press <enter> to send a line of text in
> MPW, your program sees the entire line (including the "Please ..."
> prompt). Putting your response on a spearate line is the easy way to
> solve the problem. Otherwise, you would need to have your program
> recognize and skip over the prompt.
>
> Dave Seaman
To all who answered this:
First thanks a lot for the input. I should have mentioned this before, but I had tried the \n and it still didn't work right. However, the code without the
\r was compiled to a SIOW and it did work. I guess that I'll have to fool with it more to see if I'm messing up somewhere else and try to get it to work on the command line, but I don't think MPW is necessarily friendly with the command line programming or else I simply have to get used to doing things with the new line command in my printf() statements from now on.
Again, thanks for your help.
Bill Rose
wrose@nist.gov
+++++++++++++++++++++++++++
>From gregb@genmagic.com (Greg Branche)
Date: Fri, 22 Sep 1995 21:19:55 -0700
Organization: General Magic
In article <43ui9n$qm0@dove.nist.gov>, billr@jaguar.ncsl.nist.gov wrote:
>First thanks a lot for the input. I should have mentioned this before, but I
>had tried the \n and it still didn't work right. However, the code
without the
>\r was compiled to a SIOW and it did work.
I just thought of another factor in this problem.
When entering the text in response to the prompt, did you press the
<Return> key to terminate the input, or did you press the <Enter> key?
MPW maintains a distinction between the two, since the "command line" in
the worksheet can be viewed as just another line in the document that is
being edited. (After all, MPW is just a text editor with a few minor
additions. :-)
The proper method is to use the <Enter> key to terminate the response.
This is a signal to the shell that the line containing the cursor is to be
processed as stdin.
Greg Branche
Magic Cap Entomologist
General Magic, Inc.
---------------------------
>From reed@medicine.wustl.edu (Thomas Reed)
Subject: how do I get char minus any modifier key alterations?
Date: Mon, 18 Sep 1995 16:39:53 -0500
Organization: Washington University
I need to capture and display a user's keypress. For instance, if the
user presses cmd-opt-p, I want to display "Command + Option + p".
Unfortunately, when I get the key pressed from the EventRecord, it is the
MODIFIED key -- for instance, the character from the above keypress would
be pi. This is obviously not what I want -- I don't want to display
"Command + Option + pi"!
So... is there any way that I can modify this character to get the raw